package com.yangjun.controller.report;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.yangjun.service.report.TMallRxReprotExportService;
import com.yangjun.vo.report.TMallRxReportExportVO;

@RestController
@RequestMapping(value="/excel/tmall")
public class TMallRxController {
	@Autowired
	private TMallRxReprotExportService tMallRxReprotExportService;
	
	@ResponseBody
	@RequestMapping("/getDeminsion")
	public Object getDeminsion(@RequestParam(value="reportid")String reportid,@RequestParam(value="userid")String userid){
		return tMallRxReprotExportService.getDeminsion(reportid,userid);
	}
	@ResponseBody
	@RequestMapping("/queryDataByReportId")
	public Object queryDataByReportid(@RequestParam(value="reportid")String reportid){
		return tMallRxReprotExportService.queryData(reportid);
	}
	@ResponseBody
	@RequestMapping("/queryData")
	public Object queryData(TMallRxReportExportVO tmrxreVo){
		return tMallRxReprotExportService.queryData(tmrxreVo);
	}
	@ResponseBody
	@RequestMapping("/addReport")
	public Object addReport(TMallRxReportExportVO tmrxreVo){
		return tMallRxReprotExportService.addOrUpdateReport(tmrxreVo);
	}
	
	
	@ResponseBody
	@RequestMapping("/addDownloadTaskByReportId")
	public Object addDownloadTaskByReportId(@RequestParam(value="reportid")String reportid,HttpServletRequest request){
		return tMallRxReprotExportService.addDownloadTask(reportid,request);
	}	
	
	@ResponseBody
	@RequestMapping("/addDownloadTask")
	public Object addDownloadTask(TMallRxReportExportVO tmrxreVo,HttpServletRequest request){
		return tMallRxReprotExportService.addDownloadTask(tmrxreVo,request); 
	}
}
